//
//  HS_DataArray_Model.m
//  HZ_Beautiful_Music
//
//  Created by dllo on 16/4/1.
//  Copyright © 2016年 ui. All rights reserved.
//

#import "HS_DataArray_Model.h"
#import "HZ_songs_Model.h"
@implementation HS_DataArray_Model



-(instancetype)initWithDataSource:(NSDictionary *)dataSource{
    
    
    self = [super init];
    
    if (self) {
        
        [self setValuesForKeysWithDictionary:dataSource];
        
        NSMutableArray *array = [NSMutableArray arrayWithCapacity:0];
        
        for (NSDictionary *dic in self.songs) {
            
            HZ_songs_Model *datamodel = [[HZ_songs_Model alloc] init];
      
            
            [datamodel setValuesForKeysWithDictionary:dic];
            
            [array addObject:datamodel];
    
        }
        
        self.songs = [NSArray arrayWithArray:array];
        
        
    }

    return self;

    
}

-(void)setValue:(id)value forUndefinedKey:(NSString *)key{
    
    if ([key isEqualToString:@"action"]) {
        
        self.diction = [[HS_action_Model alloc] init];
        
        [self.diction setValuesForKeysWithDictionary:value];
        
    }
    
    
    
    
    
}
@end
